
package com.quartet.utils.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 * 报警类型
 * </p>
 * @author Zheng Jie
 * @date 2020-05-07
 */
@Getter
@AllArgsConstructor
public enum TabTypeEnum {

    SELECT("1", "选中"),
    OVER_SPEED_ALARM("2", "超速报警"),
    FATIGUE_DRIVING_ALARM("3", "疲劳驾驶报警"),
    OTHER_ALARM("4", "其他报警"),
    TRAVEL("5", "行驶"),
    MOTIONLESS("6", "静止"),
    ABNORMAL("7", "异常"),
    OFF_LINE("8", "掉线"),
    DECOMMISSIONING("9", "停运"),
    VEHICLE_MAINTENANCE("10", "维修车辆"),
    COMMAND("11", "命令");
    private final String value;
    private final String description;

    public static TabTypeEnum find(String val) {
        for (TabTypeEnum dataScopeEnum : TabTypeEnum.values()) {
            if (val.equals(dataScopeEnum.getValue())) {
                return dataScopeEnum;
            }
        }
        return null;
    }

}
